#include "vector.hpp"

using namespace ns_vector;

void Test1()
{
    vector<int> v(5, 1);
    v.show();
    vector<int> copy(v);
    copy.show();
    vector<int> tmp(10, 8);
    v = tmp;
    v.show();
}

void Test2()
{
    vector<int> v;
    v.push_back(1);
    v.push_back(2);
    v.push_back(3);
    v.push_back(4);
    v.push_back(5);
    v.show();

    v.pop_back();
    v.pop_back();
    v.pop_back();
    v.pop_back();
    v.pop_back();
    v.pop_back();
    v.show();
}

void Test3()
{
    vector<int> v;
    v.push_back(8);
    v.push_back(15);
    v.push_back(3);
    v.push_back(5);
    v.push_back(11);
    cout << v[3] << endl;
}

void Test4()
{
    vector<int> v;
    vector<int>::iterator lt = v.begin();
    lt = v.insert(lt, 1);
    lt = v.insert(lt, 2);
    lt = v.insert(lt, 3);
    lt = v.insert(lt, 4);
    lt = v.insert(lt, 5);
    v.show();

    lt = v.erase(lt);
    lt = v.erase(lt);
    v.show();
}

int main()
{
    //Test1();
    //Test2();
    //Test3();
    Test4();

    return 0;
}